import request from '@/utils/request'

// 查询建模数据明细列表
export function listConstructDetail(query) {
  return request({
    url: '/model/constructDetail/list',
    method: 'get',
    params: query
  })
}

// 查询建模数据明细详细
export function getConstructDetail(constructDetailId) {
  return request({
    url: '/model/constructDetail/' + constructDetailId,
    method: 'get'
  })
}

// 新增建模数据明细
export function addConstructDetail(data) {
  return request({
    url: '/model/constructDetail',
    method: 'post',
    data: data
  })
}

// 修改建模数据明细
export function updateConstructDetail(data) {
  return request({
    url: '/model/constructDetail',
    method: 'put',
    data: data
  })
}

/// 提交异常剔除的结果
export function submitAbnormalPartitionResult(data) {
  return request({
    url: '/model/constructDetail/submitAbnormalPartitionResult',
    method: 'put',
    data: data
  })
}

// 重置建模数据明细的构型类型与状态
export function resetConstructDetail(constructId) {
  return request({
    url: '/model/constructDetail/reset',
    method: 'put',
    params: { constructId }  // 通过 URL 参数传
  })
}


// 根据建模数据id删除建模数据明细
export function delConstructDetailByConstrudtId(constructId) {
  return request({
    url: '/model/constructDetail/delete',
    method: 'put',
    params: { constructId }  // 通过 URL 参数传
  })
}

// 删除建模数据明细
export function delConstructDetail(constructDetailId) {
  return request({
    url: '/model/constructDetail/' + constructDetailId,
    method: 'delete'
  })
}
